<?php
include_once("../../../../common/module/checkA.php");
include_once("../../../../../config.php");
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'finance'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
?>



<?php

$new_detail_nid=$_REQUEST['nid'];
$new_detail_status=$_REQUEST['tellerstatus'];

?>


<?
//设置需要搜索的表格的前缀后缀
$table_Suffix="finance";
$table=$table_Prefix.$table_Suffix;
//设置需要搜索的表格的前缀后缀

?>



<?
//设置需要搜索的表格的前缀后缀
$table_Suffix="finance";
$table=$table_Prefix.$table_Suffix;
//设置需要搜索的表格的前缀后缀

?>



<?php
$sql = "update $table SET status= '$new_detail_status' where nid = $new_detail_nid";
$query=mysql_query($sql) or die ('更新审核状态失败');



$case_nid          = addslashes($_REQUEST['detail_id']);


//在更新项目的资料之前，先计算一下利润。
$_profit=sum_total($table,"cost"," status = '过账' and caseid='".$case_nid."' ");

$case_update['ai_profit']=$_profit;


$sql=update_date($table_Prefix."case",$case_update,"nid",$case_nid);
$query=mysql_query($sql) or die ('更新财务状态失败');

mysql_close($con);

?>



<script type="text/javascript">
    window.parent.location.reload();//刷新父页面
</script>




